Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tensorflow: quick fix for scope problem #24

Merged
merged 4 commits into from
Jun 29, 2019
Merged

tensorflow: quick fix for scope problem #24

merged 4 commits into from
Jun 29, 2019

Conversation

bobzhuyb
Copy link
Member

See #13

Copy link
Member

@ymjiang ymjiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new commit to solve this:

scope = tf.compat.v1.get_default_graph().get_name_scope()
AttributeError: 'module' object has no attribute 'v1'

Now it can run. Feel free to merge.

scope = tf.compat.v1.get_default_graph().get_name_scope()
try:
scope = tf.get_default_graph().get_name_scope()
except:
Copy link
Contributor

@changlan changlan Jun 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put specific exception cases after except?

Copy link
Member

@ymjiang ymjiang Jun 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps if-else will be better, see the commit below.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed

@ymjiang ymjiang merged commit d299643 into master Jun 29, 2019
@bobzhuyb bobzhuyb deleted the tf_scope branch June 30, 2019 05:19
pleasantrabbit pushed a commit that referenced this pull request Jul 13, 2020
* format: refactor

* format: fix typos

* format: update setup.py

* format: update format
pleasantrabbit pushed a commit that referenced this pull request Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants